<?php
$this->breadcrumbs = array(
    ResourceType::$names[$_GET['type']] =>  array('index', 'type'=>$_GET['type']),
    '物理资源' =>  array('physical', 'type'=>$_GET['type'], 'id'=>$res_id),
    '分区列表',
);
?>

<?php $this->widget('bootstrap.widgets.TbGridView', array(
    'type'=>'striped bordered condensed',
    'dataProvider'  =>  $dataProvider,
    'pager'=>array(
        'class'=>'CLinkPager',           
        'nextPageLabel'=>'下一页',           
        'prevPageLabel'=>'上一页',           
        'header'=>'',   
    ),   
    'selectableRows'=> 2,
    'summaryText'   =>  '显示{start}-{end}条.共{count}条记录,当前第{page}页',
    'template'      =>  '{items}{pager}',
    'columns'       =>  array(
       array(
            'class' =>  'CCheckBoxColumn',
        ),
        array(
            'header'=>  '#',
            'name'  =>  'partition_id',
            'value' =>  '$data->partition_id'
        ),
       array(
            'header'=>  '资源名',
            'name'  =>  'physical_name',
            'value' =>  '$data->physical->physical_name',
        ),
        array(
            'name'  =>  'partition',
            'value' =>  '$data->partition'
        ),
        array(
            'name'  =>  'size',
            'value' =>  '$data->size'
        ),
        array(
            'name'  =>  'count',
            'value' =>  '$data->count'
        ),
        array(
            'name'  =>  'create_time',
            'value' =>  '$data->create_time'
        ),
        array(
            'name'  =>  'schema',
            'value' =>  '$data->schema'
        ),
       
        array(
            'class' =>  'bootstrap.widgets.TbButtonColumn',
             'template'=>'{view}',           
             'buttons'=>array(
                 'view'  =>  array(
                     'label'    =>  '查看数据',
                     'url'      =>  'Yii::app()->controller->createUrl("resource/view", array("id"=>$data->physical_id))',
                     ), 
                ),
        ),
    ),
));
?>
